//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Text;
using Eas.WebCrawler.Model.Core;
using Eas.WebCrawler.Interfaces;

namespace Eas.WebCrawler.Model.StateTrackers {
    internal interface StateTracker : System.IDisposable, Eas.WebCrawler.Model.Core.WorkerComponent {
        int GetCountOfWorkersInAction(Eas.WebCrawler.Model.Actions.ActionId actionId);
        void ReportStateChange(ProcessingState oldState, Eas.WebCrawler.Model.Actions.ProcessingAction oldAction, Eas.WebCrawler.Model.Actions.ProcessingAction newAction);
        void LoadChangeRequestsIntoState(ProcessingState state);
        void RequestChange(Eas.WebCrawler.Interfaces.WorkerState changeRequest);
        void OpenResult(IAsyncResult result, Eas.WebCrawler.Model.Actions.ProcessingAction action);
        void CloseResult(IAsyncResult result);
        void ValidateNoResultsAreOpened();
        BaseProcessingState this[int id] { get;}

        void StartAllWorkers();
        void TraceStateCounts();
    }
}
